/*
 *  quaternion.h
 *  Untitled
 *
 *  Created by Ben Nolan on 2/11/08.
 *  Copyright 2008 __MyCompanyName__. All rights reserved.
 *
 */

#pragma once

#include <string>

namespace Wonderland{
	/*
	 * A rotation around an axis
	 */
	class Quaternion{
	public:
		Quaternion(double _w, double _x, double _y, double _z) : w(_w), x(_x), y(_y), z(_z){
		}
		
		Quaternion(std::string);
		
		Quaternion(){
			w = x = y = z = 0;
		}
		
		double w,x,y,z;
		
		std::string toString() const;

		inline bool operator== (const Quaternion v) const{
			return (v.w == w) && (v.x == x) && (v.y == y) && (v.z == z);
		}
	};

	std::ostream& operator << (std::ostream &os,const Quaternion q);

}